package jackson;

import com.alibaba.fastjson.JSON;
import com.baidu.fsg.uid.annotation.IdMapping;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;

import java.io.IOException;
import java.util.ArrayList;
import java.util.List;

class Person {
 
  public String name  = "Yanbin";

  @IdMapping
  public List<String> age = new ArrayList(){{add("aa");}};
 
  @JsonProperty("city")
  public String location = "Chicago";

  public static void main(String[] args) throws IOException {
    ObjectMapper maskMapper = new ObjectMapper();
    System.out.println(maskMapper.writeValueAsString(new Person()));
//    String s = "{\"name\":\"Yanbin\",\"age\":[\"11\"],\"age_uuid\":[\"aa\"],\"city\":\"Chicago\"}";
//    System.out.println(JSON.toJSONString(maskMapper.readValue(s,Person.class),true));
  }
}